home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Magazin/MacEasy 14
/
Mac Magazin and MacEasy Magazine CD - Issue 14.iso
/
Wissenschaft & Technik
/
MacGzip 1.0b0
/
Mac
/
Internet Config
/
ICCAPI.h
< prev
next >
Wrap
Text File
|
1995-04-23
|
7KB
|
138 lines
/*
IMPORTANT NOTES ABOUT THE C CONVERSION
--------------------------------------
o Pascal "var" parameters are converted from "var x : y" to "y *x". This
means that when you see the parameter "y *x" you should be aware that
you *cannot pass in nil*. In future this restriction may be eased,
especially for the attr parameter to ICGetPref. Parameters where nil
is legal are declared using the explicit pointer type, ie "yPtr x".
o Strings are *Pascal* strings. This means that they must be word aligned.
MPW and Think C do this automatically. The last time I check, Metrowerks
C does not. If it still doesn't, then IMHO it's a bug in their compiler
and you should report it to them.
o The canonical Internet Config interface is defined in Pascal. These
headers have not been thoroughly tested. If there is a conflict between
these headers and the Pascal interfaces, the Pascal should take precedence.
*/
/* ///////////////////////////////////////////////////////////////////////////////// */
#ifndef __ICCAPI__
#define __ICCAPI__
#ifndef __TYPES__
#include <Types.h>
#endif
#ifndef __FILES__
#include <Files.h>
#endif
#ifndef __COMPONENTS__
#include <Components.h>
#endif
#ifndef __ICTYPES__
#include <ICTypes.h>
#endif
#ifndef __ICKEYS__
#include <ICKeys.h>
#endif
/* //////////////////////////////////////////////////////////////////////////////// */
enum {
internetConfigurationComponentType = 'PREF', /* the component type */
internetConfigurationComponentSubType = 'ICAp', /* the component subtype */
internetConfigurationComponentInterfaceVersion0 = 0x00000000L,
internetConfigurationComponentInterfaceVersion1 = 0x00010000L,
/* current version number is version 1 */
internetConfigurationComponentInterfaceVersion = internetConfigurationComponentInterfaceVersion1
};
typedef ComponentInstance internetConfigurationComponent;
#ifdef __cplusplus
extern "C" {
#endif __cplusplus
extern pascal ICError ICCStart(internetConfigurationComponent *inst, OSType creator);
/* checks for the presence of the Component Manager and the Internet Configuration component */
/* returns badComponentInstance if it can't find either*/
/* inst is either nil or a valid component instance */
/* this routine lets you access the component based implementation with only minimal*/
/* yucky glue */
extern pascal ICError ICCStop(internetConfigurationComponent inst);
/* shut down the component */
pascal ICError ICCFindConfigFile(internetConfigurationComponent inst, short count, ICDirSpecArrayPtr folders)
FIVEWORDINLINE(0x2F3C, 0x06, 0x02, 0x7000, 0xA82A);
pascal ICError ICCFindUserConfigFile(internetConfigurationComponent inst, ICDirSpec *where);
FIVEWORDINLINE(0x2F3C, 0x04, 0x0E, 0x7000, 0xA82A);
pascal ICError ICCSpecifyConfigFile(internetConfigurationComponent inst, FSSpec config)
FIVEWORDINLINE(0x2F3C, 0x04, 0x03, 0x7000, 0xA82A);
pascal ICError ICCGetSeed(internetConfigurationComponent inst, long *seed)
FIVEWORDINLINE(0x2F3C, 0x04, 0x04, 0x7000, 0xA82A);
pascal ICError ICCGetPerm(internetConfigurationComponent inst, ICPerm *perm)
FIVEWORDINLINE(0x2F3C, 0x04, 0x0D, 0x7000, 0xA82A);
pascal ICError ICCBegin(internetConfigurationComponent inst, ICPerm perm)
FIVEWORDINLINE(0x2F3C, 0x02, 0x05, 0x7000, 0xA82A);
pascal ICError ICCGetPref(internetConfigurationComponent inst, ConstStr255Param key, ICAttr *attr, Ptr buf, long *size)
FIVEWORDINLINE(0x2F3C, 0x10, 0x06, 0x7000, 0xA82A);
pascal ICError ICCSetPref(internetConfigurationComponent inst, ConstStr255Param key, ICAttr attr, Ptr buf, long size)
FIVEWORDINLINE(0x2F3C, 0x10, 0x07, 0x7000, 0xA82A);
pascal ICError ICCGetPrefHandle(internetConfigurationComponent inst, ConstStr255Param key, ICAttr *attr, Handle *prefh);
FIVEWORDINLINE(0x2F3C, 0x0C, 0x1A, 0x7000, 0xA82A);
pascal ICError ICCSetPrefHandle(internetConfigurationComponent inst, ConstStr255Param key, ICAttr attr, Handle prefh);
FIVEWORDINLINE(0x2F3C, 0x0C, 0x1B, 0x7000, 0xA82A);
pascal ICError ICCCountPref(internetConfigurationComponent inst, long *count)
FIVEWORDINLINE(0x2F3C, 0x04, 0x08, 0x7000, 0xA82A);
pascal ICError ICCGetIndPref(internetConfigurationComponent inst, long n, Str255 key)
FIVEWORDINLINE(0x2F3C, 0x08, 0x09, 0x7000, 0xA82A);
pascal ICError ICCDeletePref(internetConfigurationComponent inst, ConstStr255Param key)
FIVEWORDINLINE(0x2F3C, 0x04, 0x0C, 0x7000, 0xA82A);
pascal ICError ICCEnd(internetConfigurationComponent inst)
FIVEWORDINLINE(0x2F3C, 0x00, 0x0A, 0x7000, 0xA82A);
pascal ICError ICCDefaultFileName(internetConfigurationComponent inst, Str63 name)
FIVEWORDINLINE(0x2F3C, 0x04, 0x0B, 0x7000, 0xA82A);
pascal ICError ICCEditPreferences(internetConfigurationComponent inst, ConstStr255Param key);
FIVEWORDINLINE(0x2F3C, 0x04, 0x0F, 0x7000, 0xA82A);
pascal ICError ICCParseURL(internetConfigurationComponent inst, ConstStr255Param hint, Ptr data, long len, long *selStart, long *selEnd, Handle url);
FIVEWORDINLINE(0x2F3C, 0x04, 0x10, 0x7000, 0xA82A);
pascal ICError ICCLaunchURL(internetConfigurationComponent inst, ConstStr255Param hint, Ptr data, long len, long *selStart, long *selEnd);
FIVEWORDINLINE(0x2F3C, 0x18, 0x11, 0x7000, 0xA82A);
pascal ICError ICCMapFilename(internetConfigurationComponent inst, ConstStr255Param filename, ICMapEntry *entry);
FIVEWORDINLINE(0x2F3C, 0x14, 0x18, 0x7000, 0xA82A);
pascal ICError ICCMapTypeCreator(internetConfigurationComponent inst, OSType fType, OSType fCreator, ConstStr255Param filename, ICMapEntry *entry);
FIVEWORDINLINE(0x2F3C, 0x08, 0x19, 0x7000, 0xA82A);
pascal ICError ICCMapEntriesFilename(internetConfigurationComponent inst, Handle entries, ConstStr255Param filename, ICMapEntry *entry);
FIVEWORDINLINE(0x2F3C, 0x10, 0x1C, 0x7000, 0xA82A);
pascal ICError ICCMapEntriesTypeCreator(internetConfigurationComponent inst, Handle entries, OSType fType, OSType fCreator, ConstStr255Param filename, ICMapEntry *entry);
FIVEWORDINLINE(0x2F3C, 0x0C, 0x1D, 0x7000, 0xA82A);
pascal ICError ICCCountMapEntries(internetConfigurationComponent inst, Handle entries, long *count);
FIVEWORDINLINE(0x2F3C, 0x14, 0x12, 0x7000, 0xA82A);
pascal ICError ICCGetIndMapEntry(internetConfigurationComponent inst, Handle entries, long ndx, long *pos, ICMapEntry *entry);
FIVEWORDINLINE(0x2F3C, 0x08, 0x13, 0x7000, 0xA82A);
pascal ICError ICCGetMapEntry(internetConfigurationComponent inst, Handle entries, long pos, ICMapEntry *entry);
FIVEWORDINLINE(0x2F3C, 0x10, 0x14, 0x7000, 0xA82A);
pascal ICError ICCSetMapEntry(internetConfigurationComponent inst, Handle entries, long pos, ICMapEntry *entry);
FIVEWORDINLINE(0x2F3C, 0x0C, 0x15, 0x7000, 0xA82A);
pascal ICError ICCDeleteMapEntry(internetConfigurationComponent inst, Handle entries, long pos);
FIVEWORDINLINE(0x2F3C, 0x08, 0x16, 0x7000, 0xA82A);
pascal ICError ICCAddMapEntry(internetConfigurationComponent inst, Handle entries, ICMapEntry *entry);
FIVEWORDINLINE(0x2F3C, 0x08, 0x17, 0x7000, 0xA82A);
#ifdef __cplusplus
}
#endif __cplusplus
#endif